package bma.common.langutil.jmshell.common;

import java.util.Set;

import bma.common.langutil.jmshell.Session;
import bma.common.langutil.jmshell.SessionCloseListener;

public abstract class SessionWrap implements Session {

	protected Session insntance;

	public SessionWrap() {
		super();
	}

	public SessionWrap(Session insntance) {
		super();
		this.insntance = insntance;
	}

	public Session getInsntance() {
		return insntance;
	}

	public void setInsntance(Session insntance) {
		this.insntance = insntance;
	}

	public String getId() {
		return insntance.getId();
	}

	public Object getAttribute(String name) {
		return insntance.getAttribute(name);
	}

	public Set<String> getAttributeNames() {
		return insntance.getAttributeNames();
	}

	public void setAttribute(String name, Object value) {
		insntance.setAttribute(name, value);
	}

	public void removeAttribute(String name) {
		insntance.removeAttribute(name);
	}

	public void clearAttributes() {
		insntance.clearAttributes();
	}

	public boolean write(String msg) {
		return insntance.write(msg);
	}

	public boolean writeln(String msg) {
		return insntance.writeln(msg);
	}

	public void close() {
		insntance.close();
	}

	public void execute(String command) {
		insntance.execute(command);
	}

	public void addCloseListener(SessionCloseListener lis) {
		insntance.addCloseListener(lis);
	}

	public void removeCloseListener(SessionCloseListener lis) {
		insntance.removeCloseListener(lis);
	}

}
